vector<int> printListFromTailToHead(ListNode* head) 
/*输入一个链表，从尾到头打印链表每个节点的值。*/
	{
		vector<int> res;
		stack<int> s;
		if (head == NULL)
			return res;
		ListNode* p = head;
		while (p != NULL) {
			s.push(p->val);
			p = p->next;
		}
		while (!s.empty()) {
			res.push_back(s.top());
			s.pop();
		}
		return res;
	}